
/**
 * Write a description of class MAP here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
import java.util.*;
public class MAP
{
    private int size;
    private int[][] waypoints;
    private ArrayList<ArrayList<DelayCreep>> waves;
    
    public MAP()
    {
        size = 500;
        waypoints = new int[6][2];
        waypoints[0][0] = 0;
        waypoints[0][1] = 250;
        waypoints[1][0] = 100;
        waypoints[1][1] = 250;
        waypoints[2][0] = 100;
        waypoints[2][1] = 100;
        waypoints[3][0] = 400;
        waypoints[3][1] = 100;
        waypoints[4][0] = 400;
        waypoints[4][1] = 250;
        waypoints[5][0] = 500;
        waypoints[5][1] = 250;
        
        waves = new ArrayList<ArrayList<DelayCreep>>();
        
        for(int i = 1; i <= 999 ; i++)
        {
            //Boss alle 10 Waves
            if(i%10==0) {
                ArrayList<DelayCreep> wave = new ArrayList<DelayCreep>();
                wave.add(new DelayCreep(0,new BossCreep(getwaypoints()[0][0], getwaypoints()[0][1], 54+(i/5), 1500+(i/5*500))));
                waves.add(wave);
                continue;
            }
            ArrayList<DelayCreep> wave = new ArrayList<DelayCreep>();
            for(int j = 0; j < i; j++)
            {
                wave.add(new DelayCreep(j,new SimpleCreep(getwaypoints()[0][0], getwaypoints()[0][1], 54+(int)(Math.random()*30)+(2*i), 10+(int)(Math.random()*5)+(5*i))));
            }
            waves.add(wave);
        }
    }
    
    public int[][] getwaypoints()
    {
        return waypoints;
    }
    
    public int getsize()
    {
        return size;
    }
    
    public ArrayList<DelayCreep> getWave(int number)
    {
        return (waves.size()>number) ? waves.get(number) : new ArrayList<DelayCreep>();
    }
}
